//函数可以作为另一个函数的参数

function say(data) {
    console.log(data);
  }


function execute(someFunction, value) {
    someFunction(value);
  }
execute(say, "Hello");


//写法二，直接把say函数做参数
function execute2(someFunction,value) {
    someFunction(value);
}
execute2(function (data) { console.log(data)},"world!");